1705fc867005a398108696c77e2d8f6a2d0aac6c,photon-model-adapters/aws/src/test/java/com/vmware/photon/controller/model/adapters/awsadapter/TestAWSEndpointService.java,TestAWSEndpointService,testCreateEndpoint,#,99

Before Change



    @Test
    public void testCreateEndpoint() throws Throwable {
        EndpointState ep = createEndpointState();

        EndpointAllocationTaskState validateEndpoint = new EndpointAllocationTaskState();
        validateEndpoint.endpointState = ep;
        validateEndpoint.options = this.isMock ? EnumSet.of(TaskOption.IS_MOCK) : null;

        EndpointAllocationTaskState outTask = TestUtils.doPost(this.host, validateEndpoint,
                EndpointAllocationTaskState.class,
                UriUtils.buildUri(this.host, EndpointAllocationTaskService.FACTORY_LINK));

        this.host.waitForFinishedTask(EndpointAllocationTaskState.class, outTask.documentSelfLink);

        EndpointAllocationTaskState taskState = getServiceSynchronously(outTask.documentSelfLink,
                EndpointAllocationTaskState.class);
        assertNotNull(taskState);
        assertNotNull(taskState.endpointState);

        ServiceDocument endpointState = taskState.endpointState;
        assertNotNull(endpointState.documentSelfLink);

        // check endpoint document was created

After Change



    @Test
    public void testCreateEndpoint() throws Throwable {
        new EndpointServiceTests(this.host, this.regionId, this.isMock,
                ComputeDescriptionService.ComputeDescription.ENVIRONMENT_NAME_AWS)
                .testCreateEndpoint(createEndpointState());
    }

    @Test